I'd like to know how to customize the "Discussion" display to my particular needs. In this case, I'm hoping to display discussions and comments which meet these conditions:
Discussion is OPEN
Or
Discussion was CLOSED in this baseline.
I think the script would be something like the following:
// Display a Simple Discussion with comments for each Object...
Discussion disc = null
Comment c
int i = 1
for disc in obj do
{
//the next line needs to be modified to show ONLY "open" discussions or ones "closed in the current baseline"
display disc.summary "\n " disc.createdByName " on " stringOf(disc.createdOn)
for c in disc do
{
display c.text
display i ") ""Comment added by " (c.createdByName) " " (stringOf(c.createdOn)) ":\n"
}
i++
}
Chris AnnalSW Test Engineer / DOORS Database AdministratorSensis Corporation, East Syracuse, New Yorkchrisa@sensis.com
ChrisAnnal - Mon Feb 14 12:34:09 EST 2011 |
|
Re: Display Discussions - Not much to work with. Mathias Mamsch - Tue Feb 15 11:15:59 EST 2011
Maybe something like:
DiscussionFilter filt = discussionFilter (obj, OpenDiscussions)
Discussion d
for d in filt do {
display "your info"
}
dispose filt
filt = discussionFilter (obj, DiscussionsClosedInBaseline)
Discussion d
for d in filt do {
display "your info"
}
dispose filt
Cannot try at the moment but the DiscussionFilter constants are:
AllDiscussions, OpenDiscussions, ClosedDiscussions, DiscussionsActiveWithinBaseline, DiscussionsOpenedInBaseline, DiscussionsClosedInBaseline, OpenedInOrBeforeBaseline, OpenedInOrAfterBaseline
Maybe this helps, regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
|
Re: Display Discussions - Not much to work with. ChrisAnnal - Tue Feb 15 14:03:15 EST 2011 Mathias Mamsch - Tue Feb 15 11:15:59 EST 2011
Maybe something like:
DiscussionFilter filt = discussionFilter (obj, OpenDiscussions)
Discussion d
for d in filt do {
display "your info"
}
dispose filt
filt = discussionFilter (obj, DiscussionsClosedInBaseline)
Discussion d
for d in filt do {
display "your info"
}
dispose filt
Cannot try at the moment but the DiscussionFilter constants are:
AllDiscussions, OpenDiscussions, ClosedDiscussions, DiscussionsActiveWithinBaseline, DiscussionsOpenedInBaseline, DiscussionsClosedInBaseline, OpenedInOrBeforeBaseline, OpenedInOrAfterBaseline
Maybe this helps, regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks Mathias,
I incorporated your suggestions into the existing script and came up with the following:
//Trying to write script for displaying Discussions that meet the following:
//Discussion is OPEN
//Or
//Discussion was CLOSED in this baseline.
DiscussionFilter filt = discussionFilter (obj, OpenDiscussions)
Discussion d
for d in filt do
{
Comment c
int i = 1
for d in obj do
{
display d.summary " (" d.status ")"
for c in d do
{
display i ") " c.text (c.createdByName) " " (stringOf(c.createdOn)) ":\n"
display
i++
}
}
}
dispose filt
//This seems to duplicate the above in many cases...
filt = discussionFilter (obj, DiscussionsClosedInBaseline)
for d in filt do
{
Comment c
int i = 1
for d in obj do
{
display d.summary " (" d.status ")"
for c in d do
{
display i ") " c.text (c.createdByName) " " (stringOf(c.createdOn)) ":\n"
display
i++
}
}
}
dispose filt
Unfortunately, there is a problem with how this script deals with Open Discussions, in that it repeats all the comment information a 2nd time - apparently I didn't correctly implement the DiscussionsClosedInBaseline portion? I'm attaching a Word document that shows the column displaying the results of this script versus the "built-in" column one can create by choosing the option for "Display all discussions with comment text and the user name only". This built-in option is the closest to what I wanted, but some of the referenced "*.inc" files are encrypted, such that the only lines of the executable script are:
string s = GetAllComments(obj)
displayRich s
Thanks!!
Chris Annal
SW Test Engineer / DOORS Database Administrator - Sensis Corporation, East Syracuse, New York
chrisa@sensis.com
|
|
Re: Display Discussions - Not much to work with. Mathias Mamsch - Tue Feb 15 14:44:10 EST 2011 ChrisAnnal - Tue Feb 15 14:03:15 EST 2011
Thanks Mathias,
I incorporated your suggestions into the existing script and came up with the following:
//Trying to write script for displaying Discussions that meet the following:
//Discussion is OPEN
//Or
//Discussion was CLOSED in this baseline.
DiscussionFilter filt = discussionFilter (obj, OpenDiscussions)
Discussion d
for d in filt do
{
Comment c
int i = 1
for d in obj do
{
display d.summary " (" d.status ")"
for c in d do
{
display i ") " c.text (c.createdByName) " " (stringOf(c.createdOn)) ":\n"
display
i++
}
}
}
dispose filt
//This seems to duplicate the above in many cases...
filt = discussionFilter (obj, DiscussionsClosedInBaseline)
for d in filt do
{
Comment c
int i = 1
for d in obj do
{
display d.summary " (" d.status ")"
for c in d do
{
display i ") " c.text (c.createdByName) " " (stringOf(c.createdOn)) ":\n"
display
i++
}
}
}
dispose filt
Unfortunately, there is a problem with how this script deals with Open Discussions, in that it repeats all the comment information a 2nd time - apparently I didn't correctly implement the DiscussionsClosedInBaseline portion? I'm attaching a Word document that shows the column displaying the results of this script versus the "built-in" column one can create by choosing the option for "Display all discussions with comment text and the user name only". This built-in option is the closest to what I wanted, but some of the referenced "*.inc" files are encrypted, such that the only lines of the executable script are:
string s = GetAllComments(obj)
displayRich s
Thanks!!
Chris Annal
SW Test Engineer / DOORS Database Administrator - Sensis Corporation, East Syracuse, New York
chrisa@sensis.com
You probably dont need to do: for d in filt do { for d in obj do ... } You only need to do: for d in filt do { ... } The filter already knows about the object!
Regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
|
Re: Display Discussions - Not much to work with. ChrisAnnal - Wed Feb 16 12:25:12 EST 2011 Mathias Mamsch - Tue Feb 15 14:44:10 EST 2011
You probably dont need to do: for d in filt do { for d in obj do ... } You only need to do: for d in filt do { ... } The filter already knows about the object!
Regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks a bunch, Mathias!! That last suggestion did the trick. I got a little fancy with the script in order to format the results - so that Open discussions have the "Summary" and "usernames" bolded. Closed (in this baseline only) discussions have only the "Status" bolded. This makes them a little easier to distinguish at a glance. Discussions closed in previous baselines don't appear.
I'm attaching the script here.
Chris Annal SW Test Engineer / DOORS Database Administrator
Sensis Corporation, East Syracuse, New York
chrisa@sensis.com
Attachments
attachment_14583726_DisplayOpenDiscussions_OrClosedThisBasel.dxl
|
|